load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "keyside",
    srcs = [
        "array.go",
        "decode.go",
        "doc.go",
        "encode.go",
        "json.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/sql/rowenc/keyside",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/geo",
        "//pkg/geo/geopb",
        "//pkg/sql/pgrepl/lsn",
        "//pkg/sql/sem/tree",
        "//pkg/sql/types",
        "//pkg/util/bitarray",
        "//pkg/util/buildutil",
        "//pkg/util/duration",
        "//pkg/util/encoding",
        "//pkg/util/ipaddr",
        "//pkg/util/json",
        "//pkg/util/timetz",
        "//pkg/util/timeutil/pgdate",
        "//pkg/util/uuid",
        "@com_github_cockroachdb_apd_v3//:apd",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_lib_pq//oid",
    ],
)

go_test(
    name = "keyside_test",
    srcs = ["keyside_test.go"],
    deps = [
        ":keyside",
        "//pkg/settings/cluster",
        "//pkg/sql/catalog/colinfo",
        "//pkg/sql/randgen",
        "//pkg/sql/sem/eval",
        "//pkg/sql/sem/tree",
        "//pkg/sql/types",
        "//pkg/util/encoding",
        "//pkg/util/timeutil",
        "@com_github_leanovate_gopter//:gopter",
        "@com_github_leanovate_gopter//prop",
        "@com_github_stretchr_testify//require",
    ],
)
